package class3;

import java.io.*;

public class demo5 {
    public static void main(String[] args) throws IOException {
        long startTime=System.currentTimeMillis();
        BufferedInputStream bis=new BufferedInputStream(new FileInputStream("D:\\line.png"));
        BufferedOutputStream bos=new BufferedOutputStream(new FileOutputStream("D:\\temp\\test\\line.png"));
        byte[]buffer=new byte[1024];
        int len=0;
        while ((len=bis.read(buffer))!=-1){
            bos.write(buffer,0, buffer.length);
        }
        bis.close();
        bos.close();
        System.out.println("复制成功");
        System.out.println(System.currentTimeMillis()-startTime);
    }
}
